<?php
/**
 *  💡 免责声明：本软件不得用于商业用途，仅做学习交流
 *  ⚠️ 权利声明：本软件由版权人提供产品技术支持
 *  📅 项目编号：NX2025-0135
 */
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateCheckInApplicationsTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up()
    {
        Schema::create('check_in_applications', function (Blueprint $table) {
            $table->id();
            $table->unsignedBigInteger('user_id')->unique()->comment('用户id');
            $table->string('company_name', 100)->comment('公司全称');
            // 营业执照
            $table->string('license_image')->nullable()->comment('营业执照图片路径');
            // 联系人信息
            $table->string('contact_phone', 20)->comment('联系电话');

            $table->string('product_type', 20)->comment('商品类型');

            $table->tinyInteger('status')->comment('状态')->default(1);
            $table->timestamps();
        });
        \Illuminate\Support\Facades\DB::statement("ALTER TABLE `check_in_applications` comment '商家入驻'");
    }

    /**
     * Reverse the migrations.
     */
    public function down()
    {
        Schema::dropIfExists('check_in_applications');
    }
}
